# from PySide2 import QtWidgets
# import pyqtgraph as pg
#
# class MainWindow(QtWidgets.QWidget):
#
#     def __init__(self):
#         super().__init__()
#
#         self.setWindowTitle('pyqtgraph作图示例')
#
#         #1 创建 PlotWidget 对象
#         self.pw = pg.PlotWidget()
#
#         # 2设置图表标题
#         self.pw.setTitle("气温趋势",color='008080',size='12pt')
#         #self.pw.setTitle("气温趋势",size='12pt')
#
#         # 3设置上下左右的label
#         self.pw.setLabel("left","气温(摄氏度)")
#         self.pw.setLabel("bottom","时间")
#         # 4背景色改为白色
#         self.pw.setBackground('w')
#
#
#         hour = [1,2,3,4,5,6,7,8,9,10]
#         temperature = [30,32,34,32,33,31,29,32,35,45]
#
#         # 5hour 和 temperature 分别是 : x, y 轴上的值
#         self.pw.plot(hour,
#                      temperature,
#                      pen=pg.mkPen('b') # 线条颜色
#                     )
#
#         # 创建其他Qt控件
#         okButton = QtWidgets.QPushButton("OK")
#         lineEdit = QtWidgets.QLineEdit('点击信息')
#         # 水平layout里面放 edit 和 button
#         hbox = QtWidgets.QHBoxLayout()
#         hbox.addWidget(lineEdit)
#         hbox.addWidget(okButton)
#
#         # 垂直layout里面放 pyqtgraph图表控件 和 前面的水平layout
#         vbox = QtWidgets.QVBoxLayout()
#         vbox.addWidget(self.pw)
#         vbox.addLayout(hbox)
#
#         # 设置全局layout
#         self.setLayout(vbox)
#
# if __name__ == '__main__':
#     app = QtWidgets.QApplication()
#     main = MainWindow()
#     main.show()
#     app.exec_()

# from PySide2 import QtWidgets
# import sys
#
# class Window2(QtWidgets.QMainWindow):
#
#     def __init__(self):
#         super().__init__()
#         self.setWindowTitle('窗口2')
#
#         centralWidget = QtWidgets.QWidget()
#         self.setCentralWidget(centralWidget)
#
#         button = QtWidgets.QPushButton('按钮2')
#
#         grid = QtWidgets.QGridLayout(centralWidget)
#         grid.addWidget(button)
#
# if __name__ == '__main__':
#     app = QtWidgets.QApplication(sys.argv)
#     window = Window2()
#     window.show()
#     sys.exit(app.exec_())

## build a QApplication before building other widgets
# import pyqtgraph as pg
# pg.mkQApp()
#
# ## make a widget for displaying 3D objects
# import pyqtgraph.opengl as gl
# view = gl.GLViewWidget()
# view.show()
#
# ## create three grids, add each to the view
# xgrid = gl.GLGridItem()
# ygrid = gl.GLGridItem()
# zgrid = gl.GLGridItem()
# view.addItem(xgrid)
# view.addItem(ygrid)
# view.addItem(zgrid)
#
# ## rotate x and y grids to face the correct direction
# xgrid.rotate(90, 0, 1, 0)
# ygrid.rotate(90, 1, 0, 0)
#
# ## scale each grid differently
# xgrid.scale(0.2, 0.1, 0.1)
# ygrid.scale(0.2, 0.1, 0.1)
# zgrid.scale(0.1, 0.2, 0.1)



